package com.animals;

/**
 * Animal类
 * 描述：提供共通的属性
 *  2017/8/23.
 * @author Erik
 * @version 0.1
 * @since JDK1.8
 */
public  class Animal {
    private String  actor;
    private int age;
    private String skill;
    private String habit;

//getters
    public  String getActor()   {   return this.actor;  }
    public  String getSkill()   {   return this.skill;  }
    public  String getHabit()   {   return this.habit;  }
    public  int getAge()        {   return this.age;    }
//setters
    public void setActor(String actor)  {   this.actor=actor;   }
    public void setAge(int age)        {   this.age=age;       }
    public void setSkill(String skill)  {    this.skill=skill;  }
    public void setHabit(String habit)  {   this.habit=habit;   }

    public Animal(){}

    /**
     * 四参构造函数
     * @param actor 表演者
     * @param age   年龄
     * @param skill 技能
     * @param habit 喜好
     */
    public Animal(String actor,int age,String skill,String habit){
        this.setActor(actor);
        this.setAge(age);
        this.setSkill(skill);
        this.setHabit(habit);
    }
}
